#include "tcp_server.hpp"
#include <memory>

static void usage(std::string process)
{
    std::cout << "Invalid command line arguments. Usage: " << process << " -> port" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        usage(argv[0]);
        exit(1);
    }

    uint16_t port = atoi(argv[1]);
    std::unique_ptr<TcpServer> svr(new TcpServer(port));
    svr->initSevrer();
    svr->start();
    
    return 0;
}